﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SAE
{
    public class SettingConstants
    {
        public const string ConfigFileName = "settings.cfg";
     
        public static string SiteUrl
        {
            get
            {
                Common.XmlFileConfigManager config = new Common.XmlFileConfigManager(SettingConstants.ConfigFileName);

                return config.GetItem("SiteUrl");
            }
            set
            {
                Common.XmlFileConfigManager config = new Common.XmlFileConfigManager(SettingConstants.ConfigFileName);

                config.SetItem("SiteUrl", value);
            }
        }

        public static string WebUrl
        {
            get
            {
                Common.XmlFileConfigManager config = new Common.XmlFileConfigManager(SettingConstants.ConfigFileName);

                return config.GetItem("WebUrl");
            }
            set
            {
                Common.XmlFileConfigManager config = new Common.XmlFileConfigManager(SettingConstants.ConfigFileName);

                config.SetItem("WebUrl", value);
            }
        }

        public static string FarmConnectionString
        {
            get
            {
                Common.XmlFileConfigManager config = new Common.XmlFileConfigManager(SettingConstants.ConfigFileName);

                return config.GetItem("FarmConnectionString");
            }
            set
            {
                Common.XmlFileConfigManager config = new Common.XmlFileConfigManager(SettingConstants.ConfigFileName);

                config.SetItem("FarmConnectionString", value);
            }
        }
    }
}
